home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / pdc / libsrc / stringlib / strdcat.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-07  |  739 b   |  31 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel D. Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this notice
  7.  * remains intact and that modified versions of this file not be included
  8.  * as part of the PDC Software Distribution without the express consent of
  9.  * the copyright holders.
  10.  */
  11.  
  12. /*    strdcat.c
  13.  *
  14.  *    strdcat() returns a concatenated copy of two strings
  15.  */
  16.  
  17. char *strdcat(s1, s2)
  18. char *s1;
  19. char *s2;
  20. {
  21.     char *retval;
  22.  
  23.     retval = strndup(s1, strlen(s1) + strlen(s2) + 1 );
  24.  
  25.     if (retval != 0L)  {
  26.         strcat(retval, s2);
  27.         }
  28.  
  29.     return(retval);
  30. }
  31.